<template>
    <div class="position">
        <i class="iconfont position__icon">&#xe611;</i>广西南
        <i class="iconfont position__notice">&#xe705;</i>
    </div>
    <div class="search">
        <i class="iconfont">&#xe612;</i>
        <span class="search__text">搜索商品</span>
    </div>
    <div class="banner">
        <img class="banner__img" src="http://www.dell-lee.com/imgs/vue3/banner.jpg" />
    </div>
    <div class="icons">
        <div class="icons__item" v-for="(item, index) in iconsList" :key="index">
            <img class="icons__item__img" :src="item.iconUrl" :alt="item.text">
            <p class="icons__item__desc">{{item.text}}</p>
        </div>
    </div>
    <div class="gap"></div>
</template>

<script>
export default {
  name: 'StaticPart',
  setup() {
      const iconsList = [{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/超市.png',
          text: '超市便利'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/菜市场.png',
          text: '菜市场'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/水果店.png',
          text: '水果店'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/鲜花.png',
          text: '鲜花绿植'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/医药健康.png',
          text: '医药健康'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/家居.png',
          text: '家居时尚'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/蛋糕.png',
          text: '供培蛋糕'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/签到.png',
          text: '签到'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/大牌免运.png',
          text: '大牌免运'
      },{
          iconUrl: 'http://www.dell-lee.com/imgs/vue3/红包.png',
          text: '红包套餐'
      }];
      return { iconsList }
  }
}
</script>

<style lang="scss" scoped>
@import '../../style/viriables.scss';
@import '../../style/mixmins.scss';
.position{
   position: relative;
   padding: .16rem .24rem .16rem 0;
   font-size: .16rem;
   line-height: .22rem;
   color: $content-fontcolor;
   @include ellipsis;
   .position__icon{
     position: relative;
     top: 0.01rem;
     font-size: .18rem;
     margin-right: 0.08rem;
   }
   .position__notice{
       position: absolute;
       right: 0;
       font-size: .2rem;
       top: 0.18rem;
   }
}
.search{
  padding: 0 0.2rem;
  margin-bottom: .1rem;
  box-sizing: border-box;
  line-height:.32rem;
  background: $input-bgColor;
  color: #B7B7B7;
  border-radius: .16rem;
 .iconfont{
    display: inline-block;
    margin-right: .05rem;
    vertical-align: middle;
  }
  &__text{
    display: inline-block;
     font-size: 0.13rem;
    vertical-align: middle;
  }
}
.banner {
   height: 0;
   padding-bottom: 25.4%;
   overflow: hidden;
   &__img{
     width: 100%;
   }
}

.icons{
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.16rem;
  &__item{
     width: 20%;
     &__img{
       display: block;
       width: .4rem;
       height: .4rem;
       margin: 0 auto;
     }
     &__desc{
       margin: 0.06rem 0 .16rem 0;
       text-align:center;
        color: $content-fontcolor;
     }
  }
}
.gap{
  height: 0.1rem;
  margin: 0 -.18rem;
  background: $content-bgColor;
}

</style>
